class Observer {
    constructor(data) {
        this.walk(data);
    }

    walk (data) {
        let keys = Object.keys(data);
        keys.forEach(key => {
            defineReactive(data, key, data[key]);
        })
    }
}

export function observe(data) {
    if(typeof data !== 'object' || data == null) return;
    return new Observer(data);
}